package customerEnter.Frame.Aggregate.application.JDBC;

import java.util.List;

import org.springframework.jdbc.core.JdbcTemplate;

import customerEnter.Frame.Aggregate.aggregatePlug.Intefase.AggregateUnionPlugIntefase;
import customerEnter.Frame.Aggregate.application.inteface.JdbcTemateAggregateApplication;

public class JdbcTemateAggregateApplictationServer implements JdbcTemateAggregateApplication {

	AggregateUnionPlugIntefase<JdbcTemplate>	aggregateUnionPlugIntefase;

	@Override
	public <T> List<T> queryForList(String sql, Class<T> elementType) {
		return execues().queryForList(sql, elementType);
	}

	@Override
	public JdbcTemplate execues() {
		return aggregateUnionPlugIntefase.aggregatePlug();
	}

	public void InitAggregateUnionPlug(AggregateUnionPlugIntefase<JdbcTemplate> aggregateUnionPlugIntefase) {
		this.aggregateUnionPlugIntefase = aggregateUnionPlugIntefase;
	}

}
